//
//  JRBaseView.swift
//
//
//  Created by rui on 2024/4/19.
//

import UIKit

open class JRBaseView: UIView {
    
    private var isLoaded: Bool = false
    
    public override init(frame: CGRect) {
        super.init(frame: frame)
        guard self.isLoaded else {
            self.isLoaded = true
            customInit()
            return
        }
    }
    public required init?(coder: NSCoder) {
        super.init(coder: coder)
        guard self.isLoaded else {
            self.isLoaded = true
            customInit()
            return
        }
    }
    open override func awakeFromNib() {
        super.awakeFromNib()
        guard self.isLoaded else {
            self.isLoaded = true
            customInit()
            return
        }
    }
    open func customInit() {
        self.backgroundColor = .white
    }
}
